"""
Base PDE types and interfaces
"""

"""
    AbstractPDE

Abstract base type for all PDE implementations.
"""
abstract type AbstractPDE end

"""
    evolution_rate(pde::AbstractPDE, state, t)

Compute the time derivative of the state according to the PDE.
"""
function evolution_rate end

"""
    PDE <: AbstractPDE

Generic PDE from mathematical expression.
"""
struct PDE <: AbstractPDE
    expression::Function
    parameters::Dict{Symbol, Any}
    
    function PDE(expr::Function; kwargs...)
        new(expr, Dict(kwargs))
    end
end

function evolution_rate(pde::PDE, state, t)
    return pde.expression(state, t, pde.parameters)
end